import gulpError from './utils/gulpError';
App({
  globalData: {
    systemInfo: null
  },

  onLaunch: function () {

    wx.cloud.init({
      env:'prod-8g6ybd1a6ab62994',
      traceUser:true
    })

    wx.getSystemInfo({
      success: res => {
        this.globalData.systemInfo = res
      }
    })
  },

  onShow() {
    if (gulpError !== 'gulpErrorPlaceHolder') {
      wx.redirectTo({
        url: `/pages/gulp-error/index?gulpError=${gulpError}`,
      });
    }
  },
});